$design-width: 360; // 设计稿宽度360
@function px2vw($size) {
  @return #{$size/$design-width * 100}vw;
};
.dialog-success {
  width: px2vw(64);
  height: px2vw(64);
  margin: 0 auto;
  position: relative;
  .left-baffle {
    width: px2vw(32);
    height: px2vw(64);
    position: absolute;
    background-color: white;
    left: 0;
    top: 0;
    opacity: 1;
    transform-origin: 100% 50%;
    animation: leftRotate 2s linear ;
    animation-fill-mode: forwards;
    z-index: 3;
  }
  .right-baffle {
    width: px2vw(32);
    height: px2vw(64);
    position: absolute;
    background-color: white;
    right: 0;
    top: 0;
    opacity: 1;
    transform-origin:0 50%;
    animation: rightRotate 2s linear ;
    animation-delay: 2s;
    animation-fill-mode: forwards;
  }
  .icon-ok {
    width: 100%;
    height: auto;
  }
  .harf-dialog-success {
    width: px2vw(32);
    height: px2vw(64);
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    overflow: hidden;
    opacity: 1;
    animation: harf-success 1s linear;
    animation-delay: 4s;
    animation-fill-mode: forwards;
    .harf-icon-ok {
      width: auto;
      height: 100%;
    }
  }
  .harf-dialog-success::before {
    content: '';
    width: px2vw(14);
    height: px2vw(18);
    background-color: white;
    top: 50%;
    left: 60%;
    transform: translateY(-50%);
    position: absolute;
  }
}
.dialog-success::before {
  content: '';
  width: px2vw(27);
  height: px2vw(27);
  position: absolute;
  background-color: white;
  top: 50%;
  right: 29%;
  transform: translateY(-50%);
  animation: tick 2s linear;
  animation-fill-mode: forwards;
  animation-delay: 4s;
}


@keyframes leftRotate {
  0% {
    transform: rotate(0);
  }
  99% {
    transform: rotate(-180deg);
    opacity: 1;
  }
  100% {
    transform: rotate(-180deg);
    opacity: 0;
  }
}

@keyframes rightRotate {
  0% {
    transform: rotate(0);
  }
  99% {
    transform: rotate(-180deg);
    display: none;
    opacity: 1;
  }
  100% {
    transform: rotate(-180deg);
    opacity: 0;
  }
}

@keyframes harf-success {
  0% {
    opacity: 0;
  }
  1%,
  100% {
    opacity: 0;
  }
}

@keyframes tick {
  0% {
    width: px2vw(27);
  }
  100% {
    width: 0;
  }
}